<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"import="base.*,pojo.*,service.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#s{
   height:40px;
   width:490px;
   margin-bottom:5px;
   font-size:20px;
   padding:20px;
   }
  body{
	margin:0;
	padding:20px;
	background-image:url("images/innerBJ.jpg");
	background-repeat:no-repeat;
	font:80% Arial, Helvetica, sans-serif;
	color:#555;
	line-height:100%;
}  
</style>
<script type="text/javascript" src="jquery/jquery-1.6.1.js"></script>
<script type="text/javascript" src="jquery/jquery.validate.min.js"></script>
<script type="text/javascript">
$(function(){
$("#name").focus();
});
		function ok() {

			var name=$("#name").val();
			if(name==""){
			alert("请填写类别名");
			return;
			}
			
		$("#form1").submit();
}
 $(document).keydown(function(event){ 
    		 if(event.keyCode == 13) 
    		 {
    			ok();
        	}
});
</script>
</head>


<body >
<%
request.setCharacterEncoding("UTF-8");
DishesTypeService m=new DishesTypeService();
int id = Integer.valueOf(request.getParameter("id"));
dishesType dt=m.getTypeByid(id);
%>
		  
			 <form id="form1" method="post" action="action/dishesTypeUpdate.jsp">
								<input type="hidden" name="Id" value="<%=dt.getId() %>">
									
									
									<div class="field" id="s"><label>类别名:</label><input id="name" name="name" value="<%=dt.getName() %>"></div>
									
									<div ><input id="ok" type="submit"  name="Submit" value="保存" onclick="ok();"></div>
									
								
								</form>
			  <br />
			
			   
			  
		
		
		
		
		
    
	
</body>
</html>
